home *** CD-ROM | disk | FTP | other *** search
- Building the source tree in either DOS or Unix is nearly identical.
-
- There ARE a few prerequisites, though...
- DOS: The DJGPP compiler - Borland is no longer supported
- The DJGPP GNU make (might work with others)
-
- Unix: TCL (tclsh)
- GCC compiler (probably works with others)
- GNU make (might work with others)
- Complete header files (for Linux, this means that the
- Kernel sources need to be installed)
-
- The actual compile is as easy as 1-2-3.........
-
-
- 1) Set up for proper makefile...
-
- DOS: premake.bat
- (Sets up for proper makefile, and creates dummy make.inc and
- depend files)
-
- Unix: premake
- (Sets up for proper makefile, and runs build-make.inc)
-
- Other functions may be added to the premake scripts at a later time.
-
-
- 2) [Optional step] Site-specific configuration
-
- This customization should NOT include editing the Makefile.
- Instead, all customizations should be placed in a file
- named 'make.inc', which will be included within the Makefile's
- processing, and commands in make.inc will be treated the same
- as if they were in the Makefile. This way ALL changes specific
- to your site are in make.inc, and will not have to be RE-DONE
- when you upgrade to later releases of TNOS.
-
- Edit the make.inc to your needs. Anything that you WOULD change
- in the Makefile, instead override it in make.inc by including it
- in make.inc.
-
- For example, if you wish to use a different directory for installing
- TNOS other than the default of '/nos', you could add a new NOSDIR
- (and NOSDIRCMD, for MSDOS) line in make.inc.
-
- Please consult the Makefile for what things you COULD change in
- make.inc, what values are valid, and what affect certain changes
- might have on other items. Consider the Makefile as the reference
- for make.inc changes.
-
- All changes/additions to the make.inc file should be made NOW, before
- moving to the next step.
-
-
- 3) Make it....
-
- make doeverything
-
- Can't make it any easier!
-
-
- NOTE: the 'make' utility MAY be named something different than 'make' on
- your system, depending on the compiler, etc. For instance, some BSD users
- have GNU's make named 'gmake'. I can't help you here, it should be
- named 'make' ;-)
-
-
- The compiles SHOULD be clear of errors and warnings, except for two in
- forth.c, if you have the FORTH compile flag set. These warnings are
- harmless, and will ALWAYS occur if FORTH is being defined.
-
-
- -------------------------------------------------------------------------
-
- There are some special notes below for BSD/OS compilation.
-
- [author's note: Some of this is obsolete, but it retained at this time.
- There is a 'make.inc-BSDI' file, which SHOULD set your environment up
- correctly, without needing to edit the makefile.]
-
- -------------------------------------------------------------------------
-
- Notes for BSD/OS implementation
-
- This is to be regarded as a test implementation - some minor
- problems, possibly related to the odd compiler warning or two -
- are present. It is based upon BSD/OS 2.0 with patches; earlier
- versions have not been tested. It is stable i.e. has not crashed
- (yet), but still needs to be hammered.
-
- * It is possible that some of my changes are the same as those done
- by Kirk Davis VE6KIK, especially since I viewed his source, but
- I declare that they were developed independently. I hereby
- acknowledge Kirk for his assistance in getting my port working
- in the first place.
-
- * I'm still not happy with the UUCP locking - needs further work
- wrt UID and GID (and I'm not enthusiastic about a root-owned
- program rampaging around my system - this is my production box)
- - currently it is merely setgid-dialer to access the serial ports.
- Note that UUCP locking is not the same as Linux. I'll probably
- end up creating a "nos" user or something, so it's firewalled.
-
- * Some changes need to be made to "makefile.unx" - see later.
-
- * I thoroughly recommend the "Electric Fence" malloc debugging
- package by Bruce Perens; it enabled me to find a lingering problem
- with SIGSEGVs, which turned out to be an incorrect line in
- domain.txt (an errant SOA line, to be precise). As with bugs
- of this nature, it didn't crash right away, but instead clobbered
- something else... (No, I didn't fix the getline() bug.)
-
- Be aware that Electric Fence DOES slow down the system, and use
- significantly MORE virtual memory, so it should be used only when
- hunting down problems, not in day-to-day usage.
-
-
- OK, here is what you have to do to "makefile.unx" to see how I
- made the BSD/OS version:
-
-
- 1) No support for ELF. You need:
-
- #USEELF = 1
- USEELF =
- #MAKEELF = 1
- MAKEELF =
-
- 2) Static linking (LTYPE = -static) is default, but won't hurt.
-
- 3) You might want to use "gcc2" instead of the default (whichever
- it is).
-
- 4) The "INSTALL" is different; BSD/OS has protection for the serial
- ports. This needs more work wrt uid/gid, cus I'm paranoid...
- I make it setgid to "dialer" at the moment, and spawn it from my
- own UID; a later mod will have it running under its own UID. I
- also changed the UUCP directory to have GID "dialer".
-
- Old: INSTALL= install -c
- New: INSTALL= install -c -g dialer -m 2755
-
- 5) BSD/OS needs IS_LITTLE_ENDIAN, USE_SETSTACK, BSD_RANDOM.
-
- 6) Also SETSTACK= setsp.o
-
- 7) BSD/OS doesn't come with NCURSES - get 1.8.5, until 1.9.x stabilises.
- You also need:
-
- ICURSES = -I/usr/local/include/ncurses
- LCURSES = -lncurses
-
- 8) Debugging is different:
-
- DEBUG = -g
- DBGLIB = # -lefence
-
- 9) You might also want to turn off optimising whilst debugging:
-
- CFLAGS = $(LTYPE) -DUNIX $(DEBUG) $(PATCHES) $(WARNINGS) $(ICURSES) $(VERS)
-
- 10) Send abuse if this doesn't work.
-
- -- Dave Horsfall VK2KFU dave@esi.com.au
- (dave@vk2kfu.ampr.org won't work just yet)
-
-
-